#ifndef _THREAD_H
#define _THREAD_H

class DLL_EXPORT Mutex
{
	CRITICAL_SECTION cs;
public:
	Mutex() { InitializeCriticalSection(&cs); }
	~Mutex() { DeleteCriticalSection(&cs); }

	void Acquire() { EnterCriticalSection(&cs); }
	void Release() { LeaveCriticalSection(&cs); }

	bool TryAcquire() { return TryEnterCriticalSection(&cs); }
};

class DLL_EXPORT CThread abstract
{
public:
	ui32 ThreadState;
	virtual void Loop() = 0;
};

#endif